<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>三元运算符比较最大值</title>
    <script>
        window.onload = function() {
            var num1 = 88;
            var num2 = 66;
            var num3 = 28;
            
            var max = (num1 > num2) ? ((num1 > num3) ? num1 : num3) : ((num2 > num3) ? num2 : num3);

            document.getElementById("result").innerText = "最大值为：" + max;
        }
    </script>
</head>
<body>
    <p id="result"></p>
</body>
</html>